import { Injectable } from '@angular/core';
import {RequestUtil} from "../../../../util/request-util";
import {MsgResult} from "../../../../models/msg-result";
import {DamAPI} from "../../peach-constants";
import {Observable} from "rxjs/Observable";
@Injectable()
export class SourceService {

  constructor(
    private requestUtil: RequestUtil
  ) { }

  getTraceSourceData(obj):Observable<MsgResult>{
    let params = "format=json"+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&monitorCode="+obj.monitorCode;
    return this.requestUtil.post(DamAPI.getTraceSourceData,params);
  }

}
